
	
/****** Object:  Stored Procedure [dbo].HistoriesInsert    Script Date: Monday, July 27, 2009 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spHistoriesInsert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[spHistoriesInsert]
GO

			
	
	

/******************************************************************************
**		File: 
**		Name: [dbo].spHistoriesInsert
**		Desc: 
**
**		Return values:
** 
**		Called by:   
**              
**		Parameters:
**		Input							Output
**     ----------							-----------
**
**		Auth: CodeSmith
**		Date: 7/27/2009 4:18:20 PM
*******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:				Description:
**		--------		--------				-------------------------------------------
**    
*******************************************************************************/
CREATE PROCEDURE [dbo].spHistoriesInsert
	@ReceiverId int,
	@SenderId int,
	@Message nvarchar(200),
	@CreationDate datetime,
	@HistoryId int output
AS

INSERT INTO [dbo].[Histories] 
(
	[ReceiverId],
	[SenderId],
	[Message],
	[CreationDate]
) 
VALUES 
(
	@ReceiverId,
	@SenderId,
	@Message,
	@CreationDate
)

SELECT @HistoryId = @@IDENTITY

GO
	

